package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc BrotherDeptTargetObjCycleTargetValueDto
 * @使用场景
 */
@Data
public class BrotherDeptTargetObjCycleTargetValueDto
        extends BaseDto
        implements Serializable {

    /**
     * 被评对象目标周期ID
     */
    @ApiModelProperty("被评对象目标周期ID")
    private String evaObjTargetCycleId;

    /**
     * 关联目标内容ID
     */
    @ApiModelProperty("关联目标内容ID")
    private String targetCycleContentId;

    /**
     * 目标周期简称
     */
    @ApiModelProperty("目标周期简称")
    private String cyclelAlias;

    /**
     * 目标值
     */
    @ApiModelProperty("目标值")
    private Double targetValue;

    /**
     * 诊断值
     */
    @ApiModelProperty("诊断值")
    private Double targetDiagnosticValue;

    /**
     * 冗余单位
     */
    @ApiModelProperty("冗余单位")
    private String unit;

    /**
     * 部门简称
     */
    @ApiModelProperty("部门简称")
    private String deptShortName;

    /**
     * 冗余内容表主键ID
     */
    @ApiModelProperty("指标ID")
    private String entityId;

    /**
     * 被评对象目标设置ID
     */
    @ApiModelProperty("被评对象目标设置ID")
    private String evaObjOsetId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        BrotherDeptTargetObjCycleTargetValueDto that = (BrotherDeptTargetObjCycleTargetValueDto) o;
        return (
                evaObjTargetCycleId == that.evaObjTargetCycleId &&
                        targetCycleContentId == that.targetCycleContentId &&
                        cyclelAlias == that.cyclelAlias &&
                        targetValue == that.targetValue &&
                        targetDiagnosticValue == that.targetDiagnosticValue &&
                        unit == that.unit &&
                        deptShortName == that.deptShortName &&
                        entityId == that.entityId &&
                        evaObjOsetId == that.evaObjOsetId
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                evaObjTargetCycleId,
                targetCycleContentId,
                cyclelAlias,
                targetValue,
                targetDiagnosticValue,
                unit,
                deptShortName,
                entityId,
                evaObjOsetId
        );
    }

}
